//
//  ClassListTableViewCell.m
//  YanMusicPlayer
//
//  Created by 1564335 on 15-6-19.
//  Copyright (c) 2015年 胡岩 All rights reserved.
//

#import "ClassListTableViewCell.h"

@implementation ClassListTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _bgImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:_bgImageView];
        _tag_lable = [[UILabel alloc] init];
        [self.contentView addSubview:_tag_lable];
    }
    return self;
}

- (void)layoutSubviews
{
    _bgImageView.frame = CGRectMake(0, 0, _WIDTH, self.frame.size.height - 10);
    _bgImageView.layer.cornerRadius = 5;
    _bgImageView.layer.masksToBounds = YES;
    _tag_lable.frame = CGRectMake(_bgImageView.frame.origin.x + _bgImageView.frame.size.width - 90, _bgImageView.frame.origin.y + _bgImageView.frame.size.height - 50, 80, 40);
    _tag_lable.textAlignment = NSTextAlignmentCenter;
    _tag_lable.font = [UIFont systemFontOfSize:25];
    _tag_lable.textColor = [UIColor whiteColor];
}

- (void)setClassListModel:(ClassListModel *)classListModel
{
    _classListModel = classListModel;
    _tag_lable.text = _classListModel.tag_name;
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
